package com.example.springboot.service;

import com.example.springboot.mapper.FruitMapper;
import com.example.springboot.pojo.Fruit;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FruitServiceImpl implements FruitService{
    @Autowired
    private FruitMapper fruitMapper;
    
    @Override
    public List<Fruit> list() {
        return fruitMapper.list();
    }
    
    @Override
    public Fruit selectById(Long id) {
        return fruitMapper.selectById(id);
    }
    
    @Override
    public Integer add(Fruit fruit) {
        return fruitMapper.add(fruit);
    }
    
    @Override
    public Integer delete(Long id) {
        return fruitMapper.delete(id);
    }
    
    @Override
    public Integer update(Fruit fruit) {
        return fruitMapper.update(fruit);
    }
}
